package com.powernode.factory;

import com.powernode.strategy.LoginStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @description:
 * @author: mky
 * @date: 2024/7/5 9:00
 * @version: 1.0
 */
@Component
public class LoginStrategyFactory {
    @Autowired
    private Map<String,LoginStrategy> map;
    public LoginStrategy getInstance(String loginType) {
        LoginStrategy loginStrategy = map.get(loginType);
        return loginStrategy;
    }
}
